#!/usr/bin/python3
# -*- coding: UTF-8 -*-



import ctypes


gobject = ctypes.CDLL('/usr/lib/libgobject-2.0.so')

gthread = ctypes.CDLL('/usr/lib/libgthread-2.0.so')

gtk = ctypes.CDLL('/usr/lib/libgtk-x11-2.0.so')

webkit = ctypes.CDLL('/usr/lib/libwebkit-1.0.so')



gthread.g_thread_init(None)

gobject.g_type_init()

gtk.gtk_init(None, None)



win = gtk.gtk_window_new(0)

gtk.gtk_window_set_title(win, ctypes.c_char_p("Gtk WebKit"))

gtk.gtk_window_set_default_size(win, 750, 500)



view = webkit.webkit_web_view_new ()

webkit.webkit_web_view_open(view, ctypes.c_char_p("http://www.google.com/"))



scrolled = gtk.gtk_scrolled_window_new(None, None)

gtk.gtk_container_add(scrolled, view)

gtk.gtk_container_add(win, scrolled)



gtk.gtk_widget_show_all(win)



#gtk.gdk_threads_enter()